Featured Tutorials

crop,target,property,flash,tutorial,drag drop,drag flash,flash drag,hittest,collision,overlap,flash tutorial,movieclip overlap The Drop target property in Flash

The Drop target property in Flash

This flash tutorial will teach you about the drop target property. The drop target propert..

icon design,icons in illustrator,illustrator tutorial,how to design icon,icon from sketch,gradient effects,gradient colouring,drawing in illustrator,stumble upon icon How to Design a 3D Icon in Illustrator

How to Design a 3D Icon in Illustrator

This very detailed tutorial will take your through the stages of creating a 3D stumble upo..

vector art,photos,urban,graphics tutorial,vector tutorial,vectorizing,vector images,urban design,urban vector Turning photos into stylish Urban Vector Art

Turning photos into stylish Urban Vector Art

Learn how to turn your standard photos into cool vector art. This tutorial covers many asp..

firework photos,how to photo fireworks,photograph fireworks,photography,fireworks,shoot fireworks,take pictures of fireworks,fireworks with camera Firework Photography how to setup your camera

Firework Photography how to setup your camera

This digital photography tutorial will teach you how to setup your cameras shutter speed a..

vector background,vector effects,drawing,vector drawing,web20 designs,web 2.0,photoshop,vector curves,rainbow curves,photoshop backgrounds Cool Abstract Backgrounds with Coloured Vector Curves

Cool Abstract Backgrounds with Coloured Vector Curves

This tutorial will teach you how to create vector curves in Photoshop using the pen tool. ..

Featured Videos

This tutorial will teach you some of the basics of the third part..

A great example of how the many Photoshop tools can be used to im..

This tutorial will show you how to import fully layers Photoshop ..

This video will open your eyes to the strange phenomenon of Traga..

One of the most important stages of search engine optimisation is..

Learn CSS: Border Styles & Properties

There are many different types of border from solid one color to double line and even in and out set borders with different shades of color. The examples below show the code that you will need to use in the <style></style> tags of your div tags, images or form buttons.

 

Border Properties

Setting the width of a border is as simple as this:

<div style="border-width: 2px;"></div>

You can also use these next examples to change the color of a border:

<div style="border-color: #334455;"></div>

<div style="border-color: red;"></div>

 

Border Styles

Here are some examples of the various border types available with examples to show you how they appear.

border-width: 2px;border-style: solid; border-color: #f48039;

This is a solid border

 

border-width: 2px;border-style: dashed; border-color: #f48039;

This is a dashed border

 

border-width: 2px;border-style: dotted; border-color: #f48039;

This is a dotted border

 

border-width: 2px;border-style: double; border-color: #f48039;

This is a double border

 

border-width: 4px; border-style: groove; border-color: #f48039;

This is a groove border

 

border-width: 4px; border-style: ridge; border-color: #f48039;

This is a ridge border

 

border-width: 4px; border-style: inset; border-color: #f48039;

This is a inset border

 

border-width: 4px; border-style: outset;

This is a outset border

 

Shorthand CSS (for those who want their code to look a bit more pro)

Short hand in css is a way of writing many of the above examples in one line of property code, or in other words squeezing it all into one simple line, as follows:

<div style="border: 10px solid #f48039;"></div>

This is a outset border

 

More Web Design...

Other Content...

 Subscribe to our feed

Send to a friend